<?php
date_default_timezone_set('America/Sao_Paulo');
if (!function_exists('loader')) {

    function loader($classe) {
        $pastas = array('../classes', '../classes/do', 'classes');
        foreach ($pastas AS $pasta) {
            if (file_exists("{$pasta}/Class.{$classe}.php")) {
                include_once "{$pasta}/Class.{$classe}.php";
            }
        }
    }

}
spl_autoload_register('loader');

include_once 'configuracao.php';
$sessao = new Sessao();
if (!$sessao->verificaSessao() && (!isset($logar))) {
    $sessao->setCliete();
    header('location: login.php');
    exit();
} else {
    $smarty->assign('adm', $sessao->getValor('sessao_adm'));
}


